#!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Date    : 2018-01-16 20:07:06

from multiprocessing import Process
import time
import os


def procPro():
    print('parent process pid:%s, subprocess %s' % (os.getppid(), os.getpid()))
    time.sleep(1)


if __name__ == '__main__':
    print('主进程开始，parent process pid:%s' % os.getpid())
    for i in xrange(3):
        p = Process(target=procPro)
        p.start()
        p.join()
    print('parent process is over')
